import request from '@/utils/request'

// 获取设置列表
export function settingsLists(params) {
  return request({
    url: `/moon/setting/list/${params}.svc`,
    method: 'GET'
  })
}

// 参数分类
export function settingsParams(params) {
  return request({
    url: '/moon/setting/restypes.svc',
    method: 'GET',
    params
  })
}
// 获取一行的信息
export function settingsGetInfo(id) {
  return request({
    url: `/moon/setting/${id}/get.svc`,
    method: 'GET'
  })
}

// 新增
export function insertSetting(data) {
  return request({
    url: `/moon/setting/insert.svc`,
    method: 'POST',
    headers: {
      'content-type': 'application/json; chartset=utf-8'
    },
    data
  })
}

// 更新
export function updateSettings(data) {
  return request({
    url: `/moon/setting/${data.Id}/update.svc`,
    method: 'PUT',
    headers: {
      'content-type': 'application/json; chartset=utf-8'
    },
    data
  })
}

// 删除
export function settingsDelete(id) {
  return request({
    url: `/moon/setting/${id}/delete.svc`,
    method: 'DELETE'
  })
}
